<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改包信息管理')" />
    <th:block th:include="include :: select2-css" />

</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-appInfo-edit" th:object="${applicationInfo}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">应用名称：</label>
                <div class="col-sm-8">
                    <input name="appName" th:field="*{appName}" readonly class="form-control" type="text" required>
                </div>
            </div>
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">域名信息：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="domainUrl" th:field="*{domainUrl}" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">api地址：</label>
                <div class="col-sm-8">
                    <input name="apiUrl" th:field="*{apiUrl}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">官网地址：</label>
                <div class="col-sm-8">
                    <input name="wwwUrl" th:field="*{wwwUrl}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">h5页面地址：</label>
                <div class="col-sm-8">
                    <input name="h5Url" th:field="*{h5Url}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">扩展链接地址：</label>
                <div class="col-sm-8">
                    <input name="extUrl" th:field="*{extUrl}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">授权地址：</label>
                <div class="col-sm-8">
                    <input name="approveUrl" th:field="*{approveUrl}" class="form-control" type="text">
                </div>
            </div>
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">是否处理：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <select name="dealFlag" id="dealFlag" th:field="*{dealFlag}" class="form-control">-->
<!--                        <option value="0">否</option>-->
<!--                        <option value="1">是</option>-->
<!--                    </select>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div id="dealViewContent">-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">城市信息：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="addrInfo" th:field="*{addrInfo}" class="form-control" type="text">-->
<!--                    <span style="color: red" >说明：该应用屏蔽跳转的城市。eg:["北京市"]</span>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">跳转原地址：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <textarea  name="originUrl" th:field="*{originUrl}"   class="form-control"  rows="5"></textarea>-->
<!--                    <span style="color: red">说明：该应用跳转到的原地址信息。</span>-->
<!--                </div>-->
<!--            </div>-->
<!--            </div>-->
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
        var prefix = ctx + "common/appInfo";
        $("#form-appInfo-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-appInfo-edit').serialize());
            }
        }

        $('#dealFlag').change(function () {
            changeView();
        })

        function changeView(){
            var dealValue =$('#dealFlag').val();
            if (dealValue == 1){
                $('#dealViewContent').show()
            }else{
                $('#dealViewContent').hide()
            }
        }

        changeView();
    </script>
</body>
</html>